Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser: Fix restrict grammar for name and supertype in type def #12622

Merged

Conversation

caspiano
Copy link
Contributor

Fixes two issues

  • a valid class name in a class definition may only be followed by generic arguments, a superclass, or a statement end
  • a valid superclass in a class definition may only be followed by a statement end

Closes #11209

@Blacksmoke16 Blacksmoke16 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser breaking-change labels Oct 17, 2022
Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @caspiano 🙏

@beta-ziliani beta-ziliani added this to the 1.7.0 milestone Oct 17, 2022
@straight-shoota straight-shoota changed the title Parser: Fix unexpected literals in class definitions Parser: Fix restrict grammar for name and supertype in type def Oct 23, 2022
@straight-shoota straight-shoota merged commit bd83c55 into crystal-lang:master Oct 23, 2022
straight-shoota added a commit that referenced this pull request Jan 18, 2023
straight-shoota added a commit to straight-shoota/crystal that referenced this pull request Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single colon delimiter works in type names
5 participants